<?php
class User_Model_DbTable_AclResource extends Custom_Db_Table_Abstract
{
    public $_name = 'acl_resources';
    
    /**
     *
     * @param type $module
     * @return type $resourcename array
     */
    public function getResourceByModulename($module)
    {
        
        $resource = $this->getByColumn('resource_module', $module);
        
        foreach($resource as $key=>$res)
        {
            $temp = explode("_",$res['resource']);
            $resource[$key]['resource'] = $temp[1];
            
        }    

        return $resource;
    }
    public function getModulesAll()
    {
        $select = $this->select()
             ->distinct()
             ->from($this->_name,'resource_module');  
        return($this->fetchAll($select));
        
        
    }
    
}

?>
